package com.travel.controller;

        import com.travel.cms.Content;
        import com.travel.service.IndexService;
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.web.bind.annotation.RequestMapping;
        import org.springframework.web.bind.annotation.RestController;

        import java.util.List;


//根据内容类别返回内容列表
//travel-index用open-feign去调用travel-cms(内容管理微服务)
@RestController
@RequestMapping("index")
public class IndexController {
    @Autowired
    private IndexService indexService;

    //根据cid获取内容列表
    @RequestMapping("findContentByCid")
    public List<Content> findContentByCid(String cid){
        return indexService.listContentByCid(cid);
    }
}
